<!DOCTYPE html>
<meta charset="UTF-8">
<table data-type="grid" title="合并单元格" style="width: 700px; height: 250px"
	data-define="
				singleSelect: true,
				iconCls: 'icon-save',
				border:false,headerCls:'byb',
				method:'get',url: '${rc.contextPath}/assets/ui/jww/demo/testdata/grid_data1.json',fit:true,fitColumns:true,
				onLoadSuccess: onLoadSuccess
			">
	<thead>
		<tr>
			<th data-define="field:'productid',width:200">产品名称</th>
			<th data-define="field:'itemid',width:80">ID</th>
			<th data-define="field:'listprice',width:80,align:'right'">成本</th>
			<th data-define="field:'unitcost',width:80,align:'right'">单价</th>
			<th data-define="field:'attr1',width:100">属性</th>
			<th data-define="field:'status',width:60,align:'center'">状态</th>
		</tr>
	</thead>
</table>
<script type="text/javascript">
	function onLoadSuccess(data) {
	    var merges = [ {
	        index : 2,
	        rowspan : 2
	    }, {
	        index : 5,
	        rowspan : 2
	    }, {
	        index : 7,
	        rowspan : 2
	    } ];
	    for ( var i = 0; i < merges.length; i++) {
		    $(this).grid('mergeCells', {
		        index : merges[i].index,
		        field : 'productid',
		        rowspan : merges[i].rowspan
		    });
	    }
    }
</script>
